package com.abcdefg.java_chatroom.mapper;

import com.abcdefg.java_chatroom.model.Friend;
import com.abcdefg.java_chatroom.model.MessageSession;
import com.abcdefg.java_chatroom.model.MessageSessionUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageSessionMapper {
    //想根据UserId获取到所有会话Id号
    List<Integer> getSessionIdByUserId(Integer userId);
    //根据会话号，来查询包含的用户(需要把自己的ID号去除掉)
    List<Friend> getFriendsBySessionId(Integer sessionId,Integer selfUserId);
    int addMessageSession(MessageSession messageSession);
    int addMessageSessionUser(MessageSessionUser messageSessionUser);
}
